<script setup lang="ts">
import { z } from 'zod'
import { useI18n } from '#imports'
const { locales, setLocale } = useI18n()

const schema = z.object({
  email: z.string().email()
})

let items = []
for (let item of locales.value) {
    items.push({
        label: item.name,
        onclick: async () => {
            await setLocale(item.code)
        },
    })
}
</script>

<template>
    <NDropdownMenu 
    :items 
    dropdown-menu="ghost-gray" 
    :_dropdown-menu-content="{
        class: 'w-60',
        align: 'end',
        side: 'top',
      }"
    :_dropdown-menu-trigger="{
        icon: true,
        square: true,
        label: 'i-lucide-languages',
    }" />
</template>